import request from '@/utils/request'

// 新增样衣退货地址
export function returnApplyByApplyID(data) {
  return request({
    url: '/product/sampleApply/returnApplyByApplyID',
    method: 'post',
    data: data
  })
}

export function search(query) {
  return request({
    url: '/sample/returnAddress/search?keyword=' + query,
    method: 'get',
    // params: query
  })
}
// 查询样衣退货地址列表
export function listReturnAddress(query) {
  return request({
    url: '/sample/returnAddress/list',
    method: 'get',
    params: query
  })
}
// 查询样衣退货地址列表
export function getDeptPermissionList(query) {
  return request({
    url: '/product/returnaddrelation/getDeptPermissionList',
    method: 'get',
    params: query
  })
}
// 查询样衣退货地址详细
export function getReturnAddress(id) {
  return request({
    url: '/sample/returnAddress/' + id,
    method: 'get'
  })
}
// 查询样衣退货地址详细
export function getPermissionList(id) {
  return request({
    url: '/product/returnaddrelation/getPermissionList/' + id,
    method: 'get'
  })
}
// 新增样衣退货地址
export function addReturnAddress(data) {
  return request({
    url: '/sample/returnAddress',
    method: 'post',
    data: data
  })
}
// 新增样衣退货地址
export function editPermission(data) {
  return request({
    url: '/product/returnaddrelation/editPermission',
    method: 'post',
    data: data
  })
}
// 修改样衣退货地址
export function updateReturnAddress(data) {
  return request({
    url: '/sample/returnAddress',
    method: 'put',
    data: data
  })
}

// 删除样衣退货地址
export function delReturnAddress(id) {
  return request({
    url: '/sample/returnAddress/' + id,
    method: 'delete'
  })
}
